1. Field of the Invention
The present invention relates to a method for accessing a variable memory, and more specifically, to a method for accessing a variable memory of an optical disk drive which conserves memory space.
2. Description of the Prior Art
Recently, in order to satisfy requirements of storing a large amount of data, the capacity of storing media has increased rapidly. Among a variety of storage media available, an optical disk is a kind of storage media with low cost, compact size, long persistence, and high density, giving an optical disk the most potential in the future. Optical disks can be divided into compact discs (CD) and digital versatile disks (DVD). CDs can be divided into standards such as CDDA, VCD, CD-ROM, CD-R, and CD-RW etc., while DVDs can be divided into standards such as DVD-ROM, DVD-R, DVD-RW, DVD+R, DVD+RW, and DVD-RAM etc.
An optical disk drive first identifies the type of an optical disk, sets tip an initial value of some variables required to react the optical disk, and stores these variables into a variable memory. For example, the same variables can he utilized to read CDs of different standards and to write CDs of different standard. In case of DVDs, variables differ according to different standards. For example, the same variables can be utilized to read DVD-ROM, DVD-R, DVD-RW, DVD+R, and DVD+RW, but variables used to write DVD-R and DVD-RW differs from variables used to write DVD+R and DVD+RW. In case of DVD-RAM, the reading variables and writing variables can be utilized to read and write DVD-RAM. Therefore, an optical disk drive predetermines addresses in a variable memory to provide different variables required to read and write optical disks of different types.
Please refer to FIG. 1 showing the data arrangement of a variable memory 12 of a conventional optical disk drive. The optical disk drive (not shown) supports CDDA, VCD, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-R, DVD-RW, DVD+R, DVD+RW, and DVD-RAM. The variable memory 12 is for storing variables required to read and write optical disks of different types. As shown in FIG. 1, a common reading variable area, a CD reading variable area, a CD writing variable area, a DVD reading variable area, a DVD minus writing variable area, a DVD plus writing variable area, a DVD-RAM reading variable area, and a DVD-RAM writing variable area are predetermined in the variable memory 12. When an optical disk (not shown) is inserted, the optical disk drive identifies the type of the optical disk and sets up an initial value of variables required to read the optical disk and stores these variables at corresponding address in the variable memory 12.
For example, when an optical disk is inserted, the optical disk drive reads general data required to read the optical disk and set up the initial value of variables and stores them into the common variable area of the variable memory 12. If the optical disk is identified as a CD, the optical disk drive sets up reading variables required to read the optical disk and stores them into the CD reading variable area of the variable memory 12. If the optical disk is further identified as a writable CD, the optical disk drive sets up the writing variables required by CD-R/CD-RW and stores them into the CD writing variable area in the variable memory 12. If the optical disk is found to be a DVD, the optical disk drive sets up reading variables required to read the optical disk and stores them into the DVD reading variable area of the variable memory 12. If the optical disk is further identified as being a writable DVD, the optical disk drive sets up the writing variables required by DVD-R/DVD-RW and stores them into the DVD minus writing variable area in the variable memory 12, or sets up the writing variables required by DVD+R/DVD+RW and stores them into the DVD plus writing variable area in the variable memory 12, according to the type of the DVD. If the optical disk is identified as being a DVD-RAM, the optical disk drive sets up reading variables required to read the optical disk and stores them into the DVD-RAM reading variable area of the variable memory 12, or sets up the writing variables required to write the optical disk and stores them into the DVD-RAM writing variable area in the variable memory 12.
As described above, the conventional optical disk predetermines addresses in the variable memory 12 for storing different variables for reading and writing optical disks in different types. The optical disk drive accesses variable areas corresponding to the type of the optical disk in the variable memory 12 when reading or writing optical disks. However, the optical disk can read or write only one optical disk at once, so that when reading or writing an optical disk, the optical disk drive can only access the variable area corresponding to the type of the optical disk, while the other variable areas in the variable memory 12 are invalid but still occupy space. The more types the optical disk drives supports, the larger the required space in the variable memory 12, which causes a waste on memory resources.